import Vue from 'vue'
import Router from 'vue-router'
import login from "../components/login";
import register from "../components/register";
import shop from "../components/shop";
import shopcart from "../components/shopcart";
import admin from"../components/admin";

Vue.use(Router)

export default new Router({
  /* 使用历史路由 */
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path: '/register',
      name: 'register',
      component: register
    },
    {
      path: '/shop',
      name: 'shop',
      component: shop
    },
    {
      path: '/shopcart',
      name: 'shopcart',
      component: shopcart
    },
    {
      path: '/admin',
      name: 'admin',
      component: admin
    },
  ]
})
